import React from 'react';
import styles from './index.less';
import { Layout } from 'antd';
import HeaderBar from './components/header';
import SiderMenu from './components/aside';

const { Sider, Content } = Layout;

export default function IndexPage(props) {
  return (
    <div className={styles.home}>
      <Layout hasSider>
        <Sider
            style={{
            overflow: 'auto',
            height: '100vh',
            position: 'fixed',
            left: 0,
            top: 0,
            bottom: 0,
          }}
        >
          <SiderMenu />
        </Sider>{' '}
        <Layout
            className="site-layout"
            style={{
            marginLeft: 200,
          }}
        >
          <HeaderBar />
          <Content>
            {props.children}
          </Content>
        </Layout>
      </Layout>
    </div>
  );
}
